package com.aaa.a1108.demo04;

/**
 * @author 荆豪峰
 * @version 1.0
 */
public class Test01 {
    public static void main(String[] args) {
        AC220 ac220 = new AC220();
        PowerAdapter powerAdapter = new PowerAdapter(ac220);
        System.out.println(powerAdapter.output5V());
    }
}
class AC220 {
    public int output220V() {
        int output = 220;
        return output;
    }
}
interface DC5 {
    int output5V();
}
class PowerAdapter implements DC5 {
    private AC220 ac220;

    public PowerAdapter(AC220 ac220) {
        this.ac220 = ac220;
    }

    @Override
    public int output5V() {
        int output = this.ac220.output220V();
        return (output / 44);
    }
}